De-number patches
authorStéphane Glondu <glondu@debian.org>
Sun, 12 Oct 2025 09:40:08 +0000 (11:40 +0200)
committerStéphane Glondu <glondu@debian.org>
Sun, 12 Oct 2025 09:40:22 +0000 (11:40 +0200)
17 files changed:
debian/patches/0001-Put-manpages-in-section-3o-instead-of-3.patch [deleted file]
debian/patches/0002-Trigger-output-complete-exe-on-custom-with-an-enviro.patch [deleted file]
debian/patches/0003-Do-not-error-on-warnings-in-autoconf.patch [deleted file]
debian/patches/0004-Use-CCLINKFLAGS-for-linking-all-executables-and-shar.patch [deleted file]
debian/patches/0005-Check-for-definition-of-AT_SECURE-before-using-it.patch [deleted file]
debian/patches/0006-Disable-DT_TEXTREL-warnings-on-Linux-i386.patch [deleted file]
debian/patches/0007-Enable-native-backend-and-dynlink-on-hurd-amd64.patch [deleted file]
debian/patches/0008-Mark-tests-that-actually-require-multicore.patch [deleted file]
debian/patches/Check-for-definition-of-AT_SECURE-before-using-it.patch [new file with mode: 0644]
debian/patches/Disable-DT_TEXTREL-warnings-on-Linux-i386.patch [new file with mode: 0644]
debian/patches/Do-not-error-on-warnings-in-autoconf.patch [new file with mode: 0644]
debian/patches/Enable-native-backend-and-dynlink-on-hurd-amd64.patch [new file with mode: 0644]
debian/patches/Mark-tests-that-actually-require-multicore.patch [new file with mode: 0644]
debian/patches/Put-manpages-in-section-3o-instead-of-3.patch [new file with mode: 0644]
debian/patches/Trigger-output-complete-exe-on-custom-with-an-enviro.patch [new file with mode: 0644]
debian/patches/Use-CCLINKFLAGS-for-linking-all-executables-and-shar.patch [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/0001-Put-manpages-in-section-3o-instead-of-3.patch b/debian/patches/0001-Put-manpages-in-section-3o-instead-of-3.patch
deleted file mode 100644 (file)
index e747540..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-From: Julien Cristau <julien.cristau@ens-lyon.org>
-Date: Tue, 19 May 2009 17:24:52 +0200
-Subject: Put manpages in section 3o instead of 3
-
----
- api_docgen/ocamldoc/Makefile | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/api_docgen/ocamldoc/Makefile b/api_docgen/ocamldoc/Makefile
-index 5b1f894..71f5a70 100644
---- a/api_docgen/ocamldoc/Makefile
-+++ b/api_docgen/ocamldoc/Makefile
-@@ -61,6 +61,7 @@ build/libref/%.odoc: build/%.mld | build/libref
- ALL_COMPILED_DOC=$(ALL_DOC:%=build/%.odoc)
- build/man/Stdlib.3o: $(ALL_COMPILED_DOC) | build/man
-       $(V_OCAMLDOC)$(OCAMLDOC_RUN) -man -d build/man -man-mini \
-+      -man-section 3o \
-       -nostdlib -hide Stdlib -lib Stdlib -t "OCaml library" \
-       $(addprefix -load , $(ALL_COMPILED_DOC))
diff --git a/debian/patches/0002-Trigger-output-complete-exe-on-custom-with-an-enviro.patch b/debian/patches/0002-Trigger-output-complete-exe-on-custom-with-an-enviro.patch
deleted file mode 100644 (file)
index 63cbb3b..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-From: Stephane Glondu <steph@glondu.net>
-Date: Thu, 3 Sep 2020 15:21:10 +0200
-Subject: Trigger -output-complete-exe on -custom with an environment variable
-
----
- driver/main_args.ml | 10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
-
-diff --git a/driver/main_args.ml b/driver/main_args.ml
-index ea07d15..7972427 100644
---- a/driver/main_args.ml
-+++ b/driver/main_args.ml
-@@ -1920,7 +1920,6 @@ third-party libraries such as Lwt, but with a different API."
-     include Core
-     include Compiler
-     let _compat_32 = set bytecode_compatible_32
--    let _custom = set custom_runtime
-     let _dcamlprimc = set keep_camlprimc_file
-     let _dinstr = set dump_instr
-     let _dllib s = Compenv.defer (ProcessDLLs (Misc.rev_split_words s))
-@@ -1939,6 +1938,15 @@ third-party libraries such as Lwt, but with a different API."
-     let _use_runtime s = use_runtime := s
-     let _v () = Compenv.print_version_and_library "compiler"
-     let _vmthread () = Compenv.fatal vmthread_removed_message
-+    let _custom () =
-+      if
-+        match Sys.getenv_opt "OCAML_CUSTOM_USE_OUTPUT_COMPLETE_EXE" with
-+        | None | Some "" -> false
-+        | Some _ -> true
-+      then
-+        _output_complete_exe ()
-+      else
-+        set custom_runtime ()
-   end
- end
diff --git a/debian/patches/0003-Do-not-error-on-warnings-in-autoconf.patch b/debian/patches/0003-Do-not-error-on-warnings-in-autoconf.patch
deleted file mode 100644 (file)
index 63c1c65..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-From: Stephane Glondu <steph@glondu.net>
-Date: Thu, 25 Nov 2021 15:01:11 +0100
-Subject: Do not error on warnings in autoconf
-
-Bug-Debian: https://bugs.debian.org/978875
----
- tools/autogen | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tools/autogen b/tools/autogen
-index cd9f6d2..7fd2f92 100755
---- a/tools/autogen
-+++ b/tools/autogen
-@@ -16,7 +16,7 @@
- # Remove the autom4te.cache directory to make sure we start in a clean state
- rm -rf autom4te.cache
--${1-autoconf} --force --warnings=all,error
-+${1-autoconf} --force --warnings=all
- # Allow pre-processing of configure arguments for Git check-outs
- # The sed call removes dra27's copyright on the whole configure script...
diff --git a/debian/patches/0004-Use-CCLINKFLAGS-for-linking-all-executables-and-shar.patch b/debian/patches/0004-Use-CCLINKFLAGS-for-linking-all-executables-and-shar.patch
deleted file mode 100644 (file)
index 510eb3e..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-From: Torok Edwin <edwin@etorok.net>
-Date: Wed, 15 Jul 2015 16:33:23 +0300
-Subject: Use CCLINKFLAGS for linking all executables and shared libraries
-
-This allows packagers to set additional linker flags for executables and shared
-libraries created by OCaml, and for the OCaml tools themselves.
-OCaml code can be linked with various C stubs and C libraries that would
-benefit from using hardening link flags, such as -Wl,-z,relro.
-
-Origin: other
-Bug-Debian: https://bugs.debian.org/702349
-Forwarded: no
-Last-Update: <2021-12-21>
----
- configure.ac | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/configure.ac b/configure.ac
-index 64e6d7e..4d94dc6 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1353,6 +1353,10 @@ AS_CASE([$host],
-     [oc_ldflags="$oc_ldflags -Wl,-z,nobtcfi"
-      natdynlinkopts="$natdynlinkopts -Wl,-z,nobtcfi"])
-+# Use CCLINKFLAGS for linking all executables and shared libraries
-+
-+mksharedlib="$mksharedlib $CCLINKFLAGS"
-+mkexe="$mkexe $CCLINKFLAGS"
- # Configure native dynlink
diff --git a/debian/patches/0005-Check-for-definition-of-AT_SECURE-before-using-it.patch b/debian/patches/0005-Check-for-definition-of-AT_SECURE-before-using-it.patch
deleted file mode 100644 (file)
index fdbb272..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-From: Stephane Glondu <steph@glondu.net>
-Date: Wed, 24 Jul 2019 09:08:39 +0200
-Subject: Check for definition of AT_SECURE before using it
-
-This fixes compilation on kfreebsd-*.
-
-Forwarded: https://github.com/ocaml/ocaml/pull/8842
----
- otherlibs/unix/envir_unix.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/otherlibs/unix/envir_unix.c b/otherlibs/unix/envir_unix.c
-index cef6cb0..977db1c 100644
---- a/otherlibs/unix/envir_unix.c
-+++ b/otherlibs/unix/envir_unix.c
-@@ -39,7 +39,7 @@ CAMLprim value caml_unix_environment_unsafe(value unit)
- static char **secure_environ(void)
- {
--#ifdef HAS_GETAUXVAL
-+#if defined(HAS_GETAUXVAL) && defined(AT_SECURE)
-   if (!getauxval(AT_SECURE))
-     return environ;
-   else
diff --git a/debian/patches/0006-Disable-DT_TEXTREL-warnings-on-Linux-i386.patch b/debian/patches/0006-Disable-DT_TEXTREL-warnings-on-Linux-i386.patch
deleted file mode 100644 (file)
index 9dcc8ce..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-From: Stephane Glondu <steph@glondu.net>
-Date: Wed, 29 Jul 2020 16:22:39 +0200
-Subject: Disable DT_TEXTREL warnings on Linux i386
-
-Bug: https://github.com/ocaml/ocaml/issues/9800
----
- configure.ac | 10 ++++++++++
- 1 file changed, 10 insertions(+)
-
-diff --git a/configure.ac b/configure.ac
-index 4d94dc6..af1ea7b 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1608,6 +1608,16 @@ AS_CASE([$arch],
-       # Alpine and other musl-based Linux distributions
-       [common_cflags="-no-pie $common_cflags"])])
-+# Disable DT_TEXTREL warnings on Linux i386
-+# See https://github.com/ocaml/ocaml/issues/9800
-+
-+AS_CASE([$host],
-+  [i?86-*-linux-*],
-+    [common_cflags="-Wl,-z,notext $common_cflags"
-+    mksharedlib="$mksharedlib -Wl,-z,notext"
-+    mkmaindll="$mkmaindll -Wl,-z,notext"],
-+  [])
-+
- # Assembler
- AS_IF([test -n "$target_alias"],
diff --git a/debian/patches/0007-Enable-native-backend-and-dynlink-on-hurd-amd64.patch b/debian/patches/0007-Enable-native-backend-and-dynlink-on-hurd-amd64.patch
deleted file mode 100644 (file)
index 6daf5d8..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-From: Samuel Thibault <sthibault@debian.org>
-Date: Wed, 15 Jan 2025 08:23:51 +0100
-Subject: Enable native backend and dynlink on hurd-amd64
-
-Bug-Debian: https://bugs.debian.org/1086600
-Bug-Debian: https://bugs.debian.org/1094334
-Forwarded: https://github.com/ocaml/ocaml/pull/13587
----
- configure.ac | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index af1ea7b..705ab8a 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1369,6 +1369,7 @@ AS_IF([test x"$supports_shared_libraries" = 'xtrue'],
-     [*-pc-windows], [natdynlink=true],
-     [[i[3456]86-*-linux*]], [natdynlink=true],
-     [[i[3456]86-*-gnu*]], [natdynlink=true],
-+    [[x86_64-*-gnu*]], [natdynlink=true],
-     [[x86_64-*-linux*]], [natdynlink=true],
-     [arm64-*-darwin*], [natdynlink=true],
-     [aarch64-*-darwin*], [natdynlink=true],
-@@ -1490,7 +1491,7 @@ AS_CASE([$host],
-   [x86_64-*-linux*],
-     [has_native_backend=yes; arch=amd64; system=linux],
-   [x86_64-*-gnu*],
--    [arch=amd64; system=gnu],
-+    [has_native_backend=yes; arch=amd64; system=gnu],
-   [x86_64-*-dragonfly*],
-     [arch=amd64; system=dragonfly],
-   [x86_64-*-solaris*],
diff --git a/debian/patches/0008-Mark-tests-that-actually-require-multicore.patch b/debian/patches/0008-Mark-tests-that-actually-require-multicore.patch
deleted file mode 100644 (file)
index e178499..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-From: =?utf-8?q?St=C3=A9phane_Glondu?= <glondu@debian.org>
-Date: Wed, 26 Mar 2025 08:39:51 +0100
-Subject: Mark tests that actually require multicore
-
-Bug-Debian: https://bugs.debian.org/1101353
-Forwarded: https://github.com/ocaml/ocaml/pull/13906
----
- ocamltest/builtin_actions.ml              | 8 ++++++++
- testsuite/tests/memory-model/forbidden.ml | 1 +
- testsuite/tests/memory-model/publish.ml   | 1 +
- testsuite/tests/parallel/mctest.ml        | 1 +
- testsuite/tests/parallel/pingpong.ml      | 1 +
- 5 files changed, 12 insertions(+)
-
-diff --git a/ocamltest/builtin_actions.ml b/ocamltest/builtin_actions.ml
-index 0f06062..c1b783b 100644
---- a/ocamltest/builtin_actions.ml
-+++ b/ocamltest/builtin_actions.ml
-@@ -102,6 +102,13 @@ let hasstr = make
-     "str library available"
-     "str library not available")
-+let multicore = make
-+  ~name:"multicore"
-+  ~description:"Pass if running on multicore"
-+  (Actions_helpers.pass_or_skip (Domain.recommended_domain_count () >= 2)
-+    "running on multicore"
-+    "not running on multicore")
-+
- let windows_OS = "Windows_NT"
- let get_OS () = Sys.safe_getenv "OS"
-@@ -367,6 +374,7 @@ let _ =
-     hasunix;
-     hassysthreads;
-     hasstr;
-+    multicore;
-     libunix;
-     libwin32unix;
-     windows;
-diff --git a/testsuite/tests/memory-model/forbidden.ml b/testsuite/tests/memory-model/forbidden.ml
-index 676904c..daf65e5 100644
---- a/testsuite/tests/memory-model/forbidden.ml
-+++ b/testsuite/tests/memory-model/forbidden.ml
-@@ -1,5 +1,6 @@
- (* TEST
-  modules = "opt.ml barrier.ml hist.ml shared.ml run.ml outcome.ml";
-+ multicore;
-  not-bsd;
-  no-tsan; (* tsan detects the intentional data races and fails *)
-  {
-diff --git a/testsuite/tests/memory-model/publish.ml b/testsuite/tests/memory-model/publish.ml
-index a857c6c..cd000ef 100644
---- a/testsuite/tests/memory-model/publish.ml
-+++ b/testsuite/tests/memory-model/publish.ml
-@@ -1,5 +1,6 @@
- (* TEST
-  modules = "opt.ml barrier.ml hist.ml shared.ml run.ml outcome.ml";
-+ multicore;
-  no-tsan; (* tsan detects data races and fails *)
-  not-bsd;
-  {
-diff --git a/testsuite/tests/parallel/mctest.ml b/testsuite/tests/parallel/mctest.ml
-index ea339e3..8e2c51f 100644
---- a/testsuite/tests/parallel/mctest.ml
-+++ b/testsuite/tests/parallel/mctest.ml
-@@ -1,5 +1,6 @@
- (* TEST
-  include unix;
-+ multicore;
-  hasunix;
-  {
-    bytecode;
-diff --git a/testsuite/tests/parallel/pingpong.ml b/testsuite/tests/parallel/pingpong.ml
-index eb43734..2508df5 100644
---- a/testsuite/tests/parallel/pingpong.ml
-+++ b/testsuite/tests/parallel/pingpong.ml
-@@ -1,4 +1,5 @@
- (* TEST
-+ multicore;
-  no-tsan; (* TSan detects the intentional data race *)
-  {
-    bytecode;
diff --git a/debian/patches/Check-for-definition-of-AT_SECURE-before-using-it.patch b/debian/patches/Check-for-definition-of-AT_SECURE-before-using-it.patch
new file mode 100644 (file)
index 0000000..fdbb272
--- /dev/null
@@ -0,0 +1,24 @@
+From: Stephane Glondu <steph@glondu.net>
+Date: Wed, 24 Jul 2019 09:08:39 +0200
+Subject: Check for definition of AT_SECURE before using it
+
+This fixes compilation on kfreebsd-*.
+
+Forwarded: https://github.com/ocaml/ocaml/pull/8842
+---
+ otherlibs/unix/envir_unix.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/otherlibs/unix/envir_unix.c b/otherlibs/unix/envir_unix.c
+index cef6cb0..977db1c 100644
+--- a/otherlibs/unix/envir_unix.c
++++ b/otherlibs/unix/envir_unix.c
+@@ -39,7 +39,7 @@ CAMLprim value caml_unix_environment_unsafe(value unit)
+ static char **secure_environ(void)
+ {
+-#ifdef HAS_GETAUXVAL
++#if defined(HAS_GETAUXVAL) && defined(AT_SECURE)
+   if (!getauxval(AT_SECURE))
+     return environ;
+   else
diff --git a/debian/patches/Disable-DT_TEXTREL-warnings-on-Linux-i386.patch b/debian/patches/Disable-DT_TEXTREL-warnings-on-Linux-i386.patch
new file mode 100644 (file)
index 0000000..9dcc8ce
--- /dev/null
@@ -0,0 +1,30 @@
+From: Stephane Glondu <steph@glondu.net>
+Date: Wed, 29 Jul 2020 16:22:39 +0200
+Subject: Disable DT_TEXTREL warnings on Linux i386
+
+Bug: https://github.com/ocaml/ocaml/issues/9800
+---
+ configure.ac | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 4d94dc6..af1ea7b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1608,6 +1608,16 @@ AS_CASE([$arch],
+       # Alpine and other musl-based Linux distributions
+       [common_cflags="-no-pie $common_cflags"])])
++# Disable DT_TEXTREL warnings on Linux i386
++# See https://github.com/ocaml/ocaml/issues/9800
++
++AS_CASE([$host],
++  [i?86-*-linux-*],
++    [common_cflags="-Wl,-z,notext $common_cflags"
++    mksharedlib="$mksharedlib -Wl,-z,notext"
++    mkmaindll="$mkmaindll -Wl,-z,notext"],
++  [])
++
+ # Assembler
+ AS_IF([test -n "$target_alias"],
diff --git a/debian/patches/Do-not-error-on-warnings-in-autoconf.patch b/debian/patches/Do-not-error-on-warnings-in-autoconf.patch
new file mode 100644 (file)
index 0000000..63c1c65
--- /dev/null
@@ -0,0 +1,22 @@
+From: Stephane Glondu <steph@glondu.net>
+Date: Thu, 25 Nov 2021 15:01:11 +0100
+Subject: Do not error on warnings in autoconf
+
+Bug-Debian: https://bugs.debian.org/978875
+---
+ tools/autogen | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/autogen b/tools/autogen
+index cd9f6d2..7fd2f92 100755
+--- a/tools/autogen
++++ b/tools/autogen
+@@ -16,7 +16,7 @@
+ # Remove the autom4te.cache directory to make sure we start in a clean state
+ rm -rf autom4te.cache
+-${1-autoconf} --force --warnings=all,error
++${1-autoconf} --force --warnings=all
+ # Allow pre-processing of configure arguments for Git check-outs
+ # The sed call removes dra27's copyright on the whole configure script...
diff --git a/debian/patches/Enable-native-backend-and-dynlink-on-hurd-amd64.patch b/debian/patches/Enable-native-backend-and-dynlink-on-hurd-amd64.patch
new file mode 100644 (file)
index 0000000..6daf5d8
--- /dev/null
@@ -0,0 +1,32 @@
+From: Samuel Thibault <sthibault@debian.org>
+Date: Wed, 15 Jan 2025 08:23:51 +0100
+Subject: Enable native backend and dynlink on hurd-amd64
+
+Bug-Debian: https://bugs.debian.org/1086600
+Bug-Debian: https://bugs.debian.org/1094334
+Forwarded: https://github.com/ocaml/ocaml/pull/13587
+---
+ configure.ac | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index af1ea7b..705ab8a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1369,6 +1369,7 @@ AS_IF([test x"$supports_shared_libraries" = 'xtrue'],
+     [*-pc-windows], [natdynlink=true],
+     [[i[3456]86-*-linux*]], [natdynlink=true],
+     [[i[3456]86-*-gnu*]], [natdynlink=true],
++    [[x86_64-*-gnu*]], [natdynlink=true],
+     [[x86_64-*-linux*]], [natdynlink=true],
+     [arm64-*-darwin*], [natdynlink=true],
+     [aarch64-*-darwin*], [natdynlink=true],
+@@ -1490,7 +1491,7 @@ AS_CASE([$host],
+   [x86_64-*-linux*],
+     [has_native_backend=yes; arch=amd64; system=linux],
+   [x86_64-*-gnu*],
+-    [arch=amd64; system=gnu],
++    [has_native_backend=yes; arch=amd64; system=gnu],
+   [x86_64-*-dragonfly*],
+     [arch=amd64; system=dragonfly],
+   [x86_64-*-solaris*],
diff --git a/debian/patches/Mark-tests-that-actually-require-multicore.patch b/debian/patches/Mark-tests-that-actually-require-multicore.patch
new file mode 100644 (file)
index 0000000..e178499
--- /dev/null
@@ -0,0 +1,83 @@
+From: =?utf-8?q?St=C3=A9phane_Glondu?= <glondu@debian.org>
+Date: Wed, 26 Mar 2025 08:39:51 +0100
+Subject: Mark tests that actually require multicore
+
+Bug-Debian: https://bugs.debian.org/1101353
+Forwarded: https://github.com/ocaml/ocaml/pull/13906
+---
+ ocamltest/builtin_actions.ml              | 8 ++++++++
+ testsuite/tests/memory-model/forbidden.ml | 1 +
+ testsuite/tests/memory-model/publish.ml   | 1 +
+ testsuite/tests/parallel/mctest.ml        | 1 +
+ testsuite/tests/parallel/pingpong.ml      | 1 +
+ 5 files changed, 12 insertions(+)
+
+diff --git a/ocamltest/builtin_actions.ml b/ocamltest/builtin_actions.ml
+index 0f06062..c1b783b 100644
+--- a/ocamltest/builtin_actions.ml
++++ b/ocamltest/builtin_actions.ml
+@@ -102,6 +102,13 @@ let hasstr = make
+     "str library available"
+     "str library not available")
++let multicore = make
++  ~name:"multicore"
++  ~description:"Pass if running on multicore"
++  (Actions_helpers.pass_or_skip (Domain.recommended_domain_count () >= 2)
++    "running on multicore"
++    "not running on multicore")
++
+ let windows_OS = "Windows_NT"
+ let get_OS () = Sys.safe_getenv "OS"
+@@ -367,6 +374,7 @@ let _ =
+     hasunix;
+     hassysthreads;
+     hasstr;
++    multicore;
+     libunix;
+     libwin32unix;
+     windows;
+diff --git a/testsuite/tests/memory-model/forbidden.ml b/testsuite/tests/memory-model/forbidden.ml
+index 676904c..daf65e5 100644
+--- a/testsuite/tests/memory-model/forbidden.ml
++++ b/testsuite/tests/memory-model/forbidden.ml
+@@ -1,5 +1,6 @@
+ (* TEST
+  modules = "opt.ml barrier.ml hist.ml shared.ml run.ml outcome.ml";
++ multicore;
+  not-bsd;
+  no-tsan; (* tsan detects the intentional data races and fails *)
+  {
+diff --git a/testsuite/tests/memory-model/publish.ml b/testsuite/tests/memory-model/publish.ml
+index a857c6c..cd000ef 100644
+--- a/testsuite/tests/memory-model/publish.ml
++++ b/testsuite/tests/memory-model/publish.ml
+@@ -1,5 +1,6 @@
+ (* TEST
+  modules = "opt.ml barrier.ml hist.ml shared.ml run.ml outcome.ml";
++ multicore;
+  no-tsan; (* tsan detects data races and fails *)
+  not-bsd;
+  {
+diff --git a/testsuite/tests/parallel/mctest.ml b/testsuite/tests/parallel/mctest.ml
+index ea339e3..8e2c51f 100644
+--- a/testsuite/tests/parallel/mctest.ml
++++ b/testsuite/tests/parallel/mctest.ml
+@@ -1,5 +1,6 @@
+ (* TEST
+  include unix;
++ multicore;
+  hasunix;
+  {
+    bytecode;
+diff --git a/testsuite/tests/parallel/pingpong.ml b/testsuite/tests/parallel/pingpong.ml
+index eb43734..2508df5 100644
+--- a/testsuite/tests/parallel/pingpong.ml
++++ b/testsuite/tests/parallel/pingpong.ml
+@@ -1,4 +1,5 @@
+ (* TEST
++ multicore;
+  no-tsan; (* TSan detects the intentional data race *)
+  {
+    bytecode;
diff --git a/debian/patches/Put-manpages-in-section-3o-instead-of-3.patch b/debian/patches/Put-manpages-in-section-3o-instead-of-3.patch
new file mode 100644 (file)
index 0000000..e747540
--- /dev/null
@@ -0,0 +1,20 @@
+From: Julien Cristau <julien.cristau@ens-lyon.org>
+Date: Tue, 19 May 2009 17:24:52 +0200
+Subject: Put manpages in section 3o instead of 3
+
+---
+ api_docgen/ocamldoc/Makefile | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/api_docgen/ocamldoc/Makefile b/api_docgen/ocamldoc/Makefile
+index 5b1f894..71f5a70 100644
+--- a/api_docgen/ocamldoc/Makefile
++++ b/api_docgen/ocamldoc/Makefile
+@@ -61,6 +61,7 @@ build/libref/%.odoc: build/%.mld | build/libref
+ ALL_COMPILED_DOC=$(ALL_DOC:%=build/%.odoc)
+ build/man/Stdlib.3o: $(ALL_COMPILED_DOC) | build/man
+       $(V_OCAMLDOC)$(OCAMLDOC_RUN) -man -d build/man -man-mini \
++      -man-section 3o \
+       -nostdlib -hide Stdlib -lib Stdlib -t "OCaml library" \
+       $(addprefix -load , $(ALL_COMPILED_DOC))
diff --git a/debian/patches/Trigger-output-complete-exe-on-custom-with-an-enviro.patch b/debian/patches/Trigger-output-complete-exe-on-custom-with-an-enviro.patch
new file mode 100644 (file)
index 0000000..63cbb3b
--- /dev/null
@@ -0,0 +1,36 @@
+From: Stephane Glondu <steph@glondu.net>
+Date: Thu, 3 Sep 2020 15:21:10 +0200
+Subject: Trigger -output-complete-exe on -custom with an environment variable
+
+---
+ driver/main_args.ml | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/driver/main_args.ml b/driver/main_args.ml
+index ea07d15..7972427 100644
+--- a/driver/main_args.ml
++++ b/driver/main_args.ml
+@@ -1920,7 +1920,6 @@ third-party libraries such as Lwt, but with a different API."
+     include Core
+     include Compiler
+     let _compat_32 = set bytecode_compatible_32
+-    let _custom = set custom_runtime
+     let _dcamlprimc = set keep_camlprimc_file
+     let _dinstr = set dump_instr
+     let _dllib s = Compenv.defer (ProcessDLLs (Misc.rev_split_words s))
+@@ -1939,6 +1938,15 @@ third-party libraries such as Lwt, but with a different API."
+     let _use_runtime s = use_runtime := s
+     let _v () = Compenv.print_version_and_library "compiler"
+     let _vmthread () = Compenv.fatal vmthread_removed_message
++    let _custom () =
++      if
++        match Sys.getenv_opt "OCAML_CUSTOM_USE_OUTPUT_COMPLETE_EXE" with
++        | None | Some "" -> false
++        | Some _ -> true
++      then
++        _output_complete_exe ()
++      else
++        set custom_runtime ()
+   end
+ end
diff --git a/debian/patches/Use-CCLINKFLAGS-for-linking-all-executables-and-shar.patch b/debian/patches/Use-CCLINKFLAGS-for-linking-all-executables-and-shar.patch
new file mode 100644 (file)
index 0000000..510eb3e
--- /dev/null
@@ -0,0 +1,32 @@
+From: Torok Edwin <edwin@etorok.net>
+Date: Wed, 15 Jul 2015 16:33:23 +0300
+Subject: Use CCLINKFLAGS for linking all executables and shared libraries
+
+This allows packagers to set additional linker flags for executables and shared
+libraries created by OCaml, and for the OCaml tools themselves.
+OCaml code can be linked with various C stubs and C libraries that would
+benefit from using hardening link flags, such as -Wl,-z,relro.
+
+Origin: other
+Bug-Debian: https://bugs.debian.org/702349
+Forwarded: no
+Last-Update: <2021-12-21>
+---
+ configure.ac | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 64e6d7e..4d94dc6 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1353,6 +1353,10 @@ AS_CASE([$host],
+     [oc_ldflags="$oc_ldflags -Wl,-z,nobtcfi"
+      natdynlinkopts="$natdynlinkopts -Wl,-z,nobtcfi"])
++# Use CCLINKFLAGS for linking all executables and shared libraries
++
++mksharedlib="$mksharedlib $CCLINKFLAGS"
++mkexe="$mkexe $CCLINKFLAGS"
+ # Configure native dynlink
index fa84b141ba9b5102d665abe4fdb737e691fbaf1c..2f614ccadff40f80802716539fe0401062fb81b9 100644 (file)
@@ -1,8 +1,8 @@
-0001-Put-manpages-in-section-3o-instead-of-3.patch
-0002-Trigger-output-complete-exe-on-custom-with-an-enviro.patch
-0003-Do-not-error-on-warnings-in-autoconf.patch
-0004-Use-CCLINKFLAGS-for-linking-all-executables-and-shar.patch
-0005-Check-for-definition-of-AT_SECURE-before-using-it.patch
-0006-Disable-DT_TEXTREL-warnings-on-Linux-i386.patch
-0007-Enable-native-backend-and-dynlink-on-hurd-amd64.patch
-0008-Mark-tests-that-actually-require-multicore.patch
+Put-manpages-in-section-3o-instead-of-3.patch
+Trigger-output-complete-exe-on-custom-with-an-enviro.patch
+Do-not-error-on-warnings-in-autoconf.patch
+Use-CCLINKFLAGS-for-linking-all-executables-and-shar.patch
+Check-for-definition-of-AT_SECURE-before-using-it.patch
+Disable-DT_TEXTREL-warnings-on-Linux-i386.patch
+Enable-native-backend-and-dynlink-on-hurd-amd64.patch
+Mark-tests-that-actually-require-multicore.patch